Debugging a defective display

Writing types

'Parallel'
  • (begin) -> (register, value) -> (end)

  • It is not necessary to put a delay between the first and second 'write'.

  • 8bits are used to store information.

  • Any extra bit on the left is not used.

  • Any extra bit on the right is used, doing a 'shifiting' in the sequence.

  • If you pass 8 bits and then pass fewer bits to the same register, the missing bits will assume their old passed value, that is, the memory of old iterations is maintained. That said, it is important that every sequence has 8 digits, writing 0 if necessary, to maintain the fidelity of the writing.

  • Multiple iterations per 'register':

    • If exactly the same value is passed, nothing happens, it just continues with the same behavior.

    • If a different value is passed, without delay, the register will assume the value of the first iteration.

    • If a different value is passed, with a delay of at least 1ms, the register will assume the value of the next iteration.

      • I tested delays between 1ms and 2000ms, it works equally within this range.

'Serial'
  • (begin) -> (value) -> (end)

  • Doing write_lcd(0x01, 0x00) is different from {write_lcd_serial(0x01) -> write_lcd_serial(0x00)}.

Tests

Writing Tests
  • write_lcd(0x01, 0x00);

    • CPU INIT.

  • write_lcd(0x01, 0b00000001 | 0x01);

    • DC XCADE.

  • write_lcd(0x01, 0b00000010 | 0x02) == write_lcd(0x01, 0b00000100 | 0x100) == write_lcd(0x01, 0b00100000 | 0x4000);

    • ~little dots.

  • write_lcd(0x01, 0b00001000 | 0x08);

    • CNAS.

  • write_lcd(0x01, 0b00010000 | 0x0F);

    • DETCLASH, ~similar to DC XCADE.

  • write_lcd(0x01, 0b01011010 | 0x5A);

    • RESCRVCD, or, RESCRVCS.

Contrast Tests
  • write_lcd(0x01, 0x00);

    • 2 vertical.

  • write_lcd(0x01, 0x02);

    • nothing.

  • write_lcd(0x01, 0x03);

    • 1 vertical.

  • write_lcd(0x01, 0x04);

    • nothing.

  • write_lcd(0x01, 0x05);

    • 1 vertical.

  • write_lcd(0x01, 0x06);

    • nothing.

  • write_lcd(0x01, 0x07);

    • 1 vertical.

  • write_lcd(0x01, 0x08);

    • 1 weak vertical.

  • write_lcd(0x01, 0x09);

    • nothing.

  • write_lcd(0x01, 0x0A)

    • 2 weak vertical and 1 weak horizontal;

  • write_lcd(0x01, 0x0B);

    • nothing.

  • write_lcd(0x01, 0x0C);

    • nothing.

  • write_lcd(0x01, 0x0D);

    • nothing.

  • write_lcd(0x01, 0x0E);

    • 1 weak vertical.

  • write_lcd(0x01, 0x0F);

    • nothing.

  • write_lcd(0x01, 0xFF);

    • 1 vertical.

Register Scan
  • Approximately every 16bytes, the Backlight toggle (b) appeared, which leads me to believe that there is a looping in 16 total registers.

    • 80c, 92b, 109b, 125b, 141b, 145c, 157b,160c,172b, 177c, 189b, 193c, 205b, 209c, 221b, 225c, 236b, 241c, 253b.

    • The byte value is imprecise, and some may have gone unnoticed in the process.

    • c: CPU INIT, b: Backlight toggle.

Voltage on the display
  • Using 5.6V instead of 6V improved the display contrast.